// 通讯录 - 测试
<template>
    <ui-main title="通讯录" no-padding>
        <ui-split-screen left="300">
            <!--左布局-->
            <div slot="left">
                <ui-tree-menu :data="treeData" :current-key.sync="currentTreeKey" noRootAdd></ui-tree-menu>
            </div>
        
            <!--右布局-->
            <div slot="right">
                <ui-main class="h-100p" no-padding>
                    <ui-screening slot="topAccordion" v-model="searchData" @search @reset>
                        <ui-screening-row label="单位性质">
                            <ui-screening-checkbox v-model="danweiOpt" :model-id.sync="searchData.danwei"></ui-screening-checkbox>
                        </ui-screening-row>
                        <ui-screening-row label="隶属单位">
                            <ui-screening-checkbox v-model="danweiOpt" :model-id.sync="searchData.danwei"></ui-screening-checkbox>
                        </ui-screening-row>
                        <ui-screening-row flex>
                            <ui-screening-row label="显示数据">
                                <ui-screening-radio v-model="shujuOpt" :model-id.sync="searchData.shuju"></ui-screening-radio>
                            </ui-screening-row>
                            <ui-screening-row label="人员姓名">
                                <el-input size="mini" placeholder="输入人员姓名或拼音" v-model="searchData.personName"></el-input>
                            </ui-screening-row>
                            <ui-screening-row label="单位名称">
                                <el-input size="mini" placeholder="输入单位名称" v-model="searchData.unitName"></el-input>
                            </ui-screening-row>
                        </ui-screening-row>
                    </ui-screening>

                    
                    <bookListUnit></bookListUnit>
                </ui-main>
            </div>
        </ui-split-screen>
    </ui-main>
</template>
<script>
    import bookListUnit from './_bookListUnit'
    export default {
        components:{
            bookListUnit
        },
        data(){
            return {
                treeData:[// data数据源
                    {
                        id: 1,
                        label: '一级 1',
                        pinyin_code:'yi',//拼音检索
                        parentcode: '001', // 父级关联字段
                        un_add: true, // 禁用添加按钮 (un_edit禁用编辑  un_remove禁用删除)
                        children: []
                    }
                ],
                currentTreeKey:'',
                searchData:{},
                danweiOpt:[
                    {label:'政府机关',id:1},
                    {label:'事业单位',id:1},
                    {label:'军队',id:1},
                    {label:'企业',id:1},
                ],
                shujuOpt:[
                    {label:'仅显示本级',id:1},
                    {label:'包含下级',id:2},
                ],
            }
        },
    }
</script>